﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Client
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
        }

        public string Username()
        {
            return txtusername.Text;
        }
        public string Password()
        {
            return txtRemoteKey.Text;
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start(e.Link.LinkData.ToString());

        }
        private void DoLogin()
        {
            this.DialogResult = DialogResult.Yes;
            this.Close();
        }
        private void kryptonButLogin_Click(object sender, EventArgs e)
        {
            DoLogin();
        }

        private void kryptonButCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

        private void txtRemoteKey_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.Enter: DoLogin();
                    break;

            }
            e.SuppressKeyPress = false;
        }


        

    }
}
